// components/navigation/index.js
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
     title:{
       type:String,
       value:'全友定制＋'
     },
     src:{
       type:String,
       value:'../../static/img/nav_bg_image.png'
     },
     placeImageSrc: {
      type: String,
      value: '../../static/img/nav_bg_image.png'
     },
     isNavHome:{
       type:Boolean,
       value:false
     }
  },

  /**
   * 组件的初始数据
   */
  data: {
    pagesStack: [],
    navHeight: app.globalData.navHeight ,
    menuBotton: app.globalData.menuBotton ,
    menuRight: app.globalData.menuRight ,
    menuHeight: app.globalData.menuHeight
  },
  
  created() {
    
  },
  attached: function () {
    // const { statusBarHeight } = wx.getSystemInfoSync();
    this.setData({ pagesStack: getCurrentPages()});
    // console.log(this.data.pagesStack)
    // console.log("component:",this)
  },

   
  /**
   * 组件的方法列表
   */
  methods: {

    goBack() {
      if (this.data.isNavHome){
        wx.switchTab({
          url: '/pages/home/main/index'
        })
      }
      else
      {
        wx.navigateBack({

        })
      }
    },
    goHome() {
      wx.switchTab({
        url: '/pages/home/main/index'
      })
    },
  }
})
